<%@ page import="News.service.UserServer" %>
<%@ page import="javax.swing.*" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/1 0001
  Time: 16:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");//设置字符集
String news=(String)request.getParameter("news");
    UserServer l=new UserServer();
    int i=l.add(news);
    if(i>0){
        JOptionPane.showMessageDialog(null,"添加成功！");
    }else{
        JOptionPane.showMessageDialog(null,"添加失败！");
    }
    response.sendRedirect("cUser.jsp");
%>
</body>
</html>
